<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATES_PATH;?>/css/member_order.css">
<link href="<?php echo TEMPLATES_PATH;?>/css/btn.css" media="all" rel="stylesheet" type="text/css">
<link href="<?php echo TEMPLATES_PATH;?>/css/checkbox.css" media="all" rel="stylesheet" type="text/css">
<link href="<?php echo TEMPLATES_PATH;?>/css/list.css" media="all" rel="stylesheet" type="text/css">
<header class="layout head padding-small">
    <a href="javascript:pageBack();" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">我的礼品</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
	<div>
        <?php if(count($output['order_list'])>0){ ?>
    <?php foreach ($output['order_list'] as $val) { ?>
        <div class="bg-white  margin padding radius-big cart-list padding-bottom clearfix">

                    <!--积分订单S-->
                    <div class="bg-white  margin padding radius-big cart-list padding-bottom clearfix">
                        <!--礼品单号 订单状态S-->
                        <div>兑换时间：<span><?php echo @date("Y-m-d H:i:s",$val['point_addtime']); ?></span></div>
                        <div class="padding-top clearfix">
                            <div class="float-left">兑换单号：<span class=""><?php echo $val['point_ordersn']; ?></span></div>

                            <div class="float-right text-red">
                                <?php if ($val['point_orderstate'] == 30) { ?>
                                <a href="javascript:void(0);" class="bg-red float-right text-small radius text-white margin-left padding-small" onclick="if(confirm('确认收到兑换礼品吗？')){window.location.href='index.php?act=member_order&op=receiving_order&order_id=<?php echo $val['point_orderid']; ?>'}">确认收货</a>
                                <?php } ?>
        <?php if ($val['point_orderstate'] == 20) { ?>
            <a href="javascript:void(0);" class="bg-red float-right text-small radius text-white margin-left padding-small" onclick="if(confirm('确认取消兑换信息？')){window.location.href='index.php?act=member_order&op=cancel_order&order_id=<?php echo $val['point_orderid']; ?>'}">取消兑换</a>
        <?php }?>
                            </div>

                        </div>
                        <!--礼品单号 订单状态E-->
                        <!--商品S-->
                        <ul class="sale-tab border radius margin-top padding-small">
                            <?php foreach($val['prodlist'] as $k=>$v) {?>
                                <li class="sale-tab-list">
                                    <a href="index.php?act=pointprod&op=pinfo&id=<?php echo $v['point_goodsid']?>" class="clearfix">
                                        <span class="goods-img float-left"><img src="<?php echo SiteUrl.DS.$v['point_goodsimage'];?>" onload="javascript:DrawImage(this,90,90);" alt="" class="good-img"></span>
                                        <span class="goods-name margin-bottom text-small margin-small-left"><?php echo $v['point_goodsname']; ?></span>
                                        <span class="text-red">兑换积分：<i class="goods-price"><?php echo $v['point_goodspoints']; ?></i> x <i class="salesNum"><?php echo $v['point_goodsnum']; ?></i></span>
                                    </a>
                                </li>
                            <?php }?>
                        </ul>
                        <!--商品E-->
                        <div class="padding-top clearfix">
                            <a href="index.php?act=member_order&op=pointOrderDetail&order_id=<?php echo $val['point_orderid']; ?>" class="bg-red float-right text-small radius text-white margin-left padding-small">查看详细</a>
                            <div class="sale-price text-small">总兑换积分：<span class="text-red text-big"><?php echo $val['point_allpoint']; ?></span></div>
                        </div>
                    </div>
                    <!--积分订单E-->

        </div>
			      <?php } ?>
			      

                <?php } else { ?>
                      <div class="noTxt text-center text-gray padding-large">
                          <i class="icon-meh-o"></i>
                          <p>您还没有兑换过任何礼品哦，<br><a href="index.php?act=pointprod" class="text-ef7f7e">去积分中心逛逛</a>可能会遇到喜欢的礼品呢。</p>
                      </div>
                <?php }?>


        <?php include 'page.php';?>
    </div>  

